#include "winfactory.h"
#include "winpainter.h"
#include "local_resource.h"

WindowsFactory::WindowsFactory()
    : resouce_impl_(0)
{

}

WindowsFactory::~WindowsFactory()
{
    if( resouce_impl_ )
        delete resouce_impl_;
}

FacePainterImpl * WindowsFactory::GetPainterImpl()
{
    return new WinPainterImpl();
}

WinResourceImpl * WindowsFactory::GetResourceImpl()
{
    if( resouce_impl_ )
        return resouce_impl_;

    resouce_impl_ = new WinLocalResourceImpl;
    return resouce_impl_;
}